import {defineAsyncComponent} from "vue";
import "nprogress/nprogress.css";
import  NProgress  from "nprogress";
import Loading from "../components/Loading/Loading.vue"
NProgress.configure({
    trickleSpeed: 50,
    showSpinner: false,
  });
export function getAsyncPage(path){
    return defineAsyncComponent({
        loader: ()=> import(path),
        loadingComponent: Loading,
      });
}


export function getAsyncComponent(path){
    return defineAsyncComponent({
        loader: ()=>{
            return import(path);
        },
        loadingComponent:Loading
    })
}